package com.kaka.bus.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by OnionMac on 2018/1/18.
 */

public class Rolling implements Parcelable {


    /**
     * rolling : ["用户138****5821的用户刚刚卖出一部iphone6","用户136****3211的用户刚刚卖出一部小米6s"]
     * maxLoanMoney : 5000
     * serviceCall : 010-53940639
     * adBanner : [{"creationTime":"2018-04-03 10:04:16","device":"ios","directUrl":"","id":11,"isDelete":2,"product":{"amountDown":1000,"amountUp":100000,"applicationCondition":"你想借钱吗","applyCount":0,"auditDesc":"快来吧123213213","businessId":"1","creationDate":"2018-15-12 17:15:39","dayReat":"0.07","directUrl":"http://www.baidu.com","enable":"0","estimatedAmount":1000,"flag":"0","headline":"随心购","id":1,"isSelf":"y","marks":[{"id":"7","isDelete":"2","markDesc":"火爆","productId":"1"},{"id":"8","isDelete":"2","markDesc":"新口子,推荐","productId":"1"}],"payEnable":"0","period":10,"productDescription":"京东购物卡","productIcon":"http://192.168.1.95:12345/platform-app/images/home_but_jsjk@2x.png","productInfoId":2,"productName":"随心购","productTypeCode":"pay_card","productTypeName":"购物卡","range":"1000~10万","remark":"京东购物卡","renewServiceFee":200,"serviceFee":200,"subhead":"京东购物卡","unit":"天","updateDate":"2018-22-02 14:22:53"},"productId":"1","status":1,"type":2,"url":"http://uhuishou.ronghezulin.com/banner/rename.png"},{"creationTime":"2018-05-03 10:05:00","device":"Android","directUrl":"","id":12,"isDelete":2,"product":{"amountDown":1000,"amountUp":100000,"applicationCondition":"你想借钱吗","applyCount":0,"auditDesc":"快来吧123213213","businessId":"1","creationDate":"2018-15-12 17:15:39","dayReat":"0.07","directUrl":"http://www.baidu.com","enable":"0","estimatedAmount":1000,"flag":"0","headline":"随心购","id":1,"isSelf":"y","marks":[{"$ref":"$.data.adBanner[0].product.marks[0]"},{"$ref":"$.data.adBanner[0].product.marks[1]"}],"payEnable":"0","period":10,"productDescription":"京东购物卡","productIcon":"http://192.168.1.95:12345/platform-app/images/home_but_jsjk@2x.png","productInfoId":2,"productName":"随心购","productTypeCode":"pay_card","productTypeName":"购物卡","range":"1000~10万","remark":"京东购物卡","renewServiceFee":200,"serviceFee":200,"subhead":"京东购物卡","unit":"天","updateDate":"2018-22-02 14:22:53"},"productId":"1","status":1,"type":2,"url":"http://uhuishou.ronghezulin.com/banner/rename.png"}]
     * banner : [{"creationTime":"2016-14-10 11:14:08","device":"Android","directUrl":"http://uhuishou.ronghezulin.com/banner/youhuishou/strategy.html","id":2,"isDelete":2,"product":{"amountDown":1000,"amountUp":100000,"applicationCondition":"你想借钱吗","applyCount":0,"auditDesc":"快来吧123213213","businessId":"1","creationDate":"2018-15-12 17:15:39","dayReat":"0.07","directUrl":"http://www.baidu.com","enable":"0","estimatedAmount":1000,"flag":"0","headline":"随心购","id":1,"isSelf":"y","marks":[{"id":"7","isDelete":"2","markDesc":"火爆","productId":"1"},{"id":"8","isDelete":"2","markDesc":"新口子,推荐","productId":"1"}],"payEnable":"0","period":10,"productDescription":"京东购物卡","productIcon":"http://192.168.1.95:12345/platform-app/images/home_but_jsjk@2x.png","productInfoId":2,"productName":"随心购","productTypeCode":"pay_card","productTypeName":"购物卡","range":"1000~10万","remark":"京东购物卡","renewServiceFee":200,"serviceFee":200,"subhead":"京东购物卡","unit":"天","updateDate":"2018-22-02 14:22:53"},"productId":"1","status":1,"type":1,"url":"http://uhuishou.ronghezulin.com/banner/banner.jpg"}]
     * workTime : 周日至周五9:00-18:00
     */

    private String maxLoanMoney;
    private String selfLocationId;
    private String status;
    private String type;
    private String url;
    private String selfProductId;
    private String id;
    private String device;
    private String directUrl;
    private String productId;
    private boolean isDelete;

    private String serviceCall;
    private String workTime;
    private List<String> rolling;
    private List<AdBannerBean> adBanner;
    private List<BannerBean> banner;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getDirectUrl() {
        return directUrl;
    }

    public void setDirectUrl(String directUrl) {
        this.directUrl = directUrl;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public boolean isDelete() {
        return isDelete;
    }

    public void setDelete(boolean delete) {
        isDelete = delete;
    }

    public String getSelfLocationId() {
        return selfLocationId;
    }

    public void setSelfLocationId(String selfLocationId) {
        this.selfLocationId = selfLocationId;
    }

    public String getSelfProductId() {
        return selfProductId;
    }

    public void setSelfProductId(String selfProductId) {
        this.selfProductId = selfProductId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMaxLoanMoney() {
        return maxLoanMoney;
    }

    public void setMaxLoanMoney(String maxLoanMoney) {
        this.maxLoanMoney = maxLoanMoney;
    }

    public String getServiceCall() {
        return serviceCall;
    }

    public void setServiceCall(String serviceCall) {
        this.serviceCall = serviceCall;
    }

    public String getWorkTime() {
        return workTime;
    }

    public void setWorkTime(String workTime) {
        this.workTime = workTime;
    }

    public List<String> getRolling() {
        return rolling;
    }

    public void setRolling(List<String> rolling) {
        this.rolling = rolling;
    }

    public List<AdBannerBean> getAdBanner() {
        return adBanner;
    }

    public void setAdBanner(List<AdBannerBean> adBanner) {
        this.adBanner = adBanner;
    }

    public List<BannerBean> getBanner() {
        return banner;
    }

    public void setBanner(List<BannerBean> banner) {
        this.banner = banner;
    }

    public static class AdBannerBean implements Parcelable {

        /**
         * creationTime : 2018-04-03 10:04:16
         * device : ios
         * directUrl :
         * id : 11
         * isDelete : 2
         * product : {"amountDown":1000,"amountUp":100000,"applicationCondition":"你想借钱吗","applyCount":0,"auditDesc":"快来吧123213213","businessId":"1","creationDate":"2018-15-12 17:15:39","dayReat":"0.07","directUrl":"http://www.baidu.com","enable":"0","estimatedAmount":1000,"flag":"0","headline":"随心购","id":1,"isSelf":"y","marks":[{"id":"7","isDelete":"2","markDesc":"火爆","productId":"1"},{"id":"8","isDelete":"2","markDesc":"新口子,推荐","productId":"1"}],"payEnable":"0","period":10,"productDescription":"京东购物卡","productIcon":"http://192.168.1.95:12345/platform-app/images/home_but_jsjk@2x.png","productInfoId":2,"productName":"随心购","productTypeCode":"pay_card","productTypeName":"购物卡","range":"1000~10万","remark":"京东购物卡","renewServiceFee":200,"serviceFee":200,"subhead":"京东购物卡","unit":"天","updateDate":"2018-22-02 14:22:53"}
         * productId : 1
         * status : 1
         * type : 2
         * url : http://uhuishou.ronghezulin.com/banner/rename.png
         */

        private String creationTime;
        private String device;
        private String directUrl;
        private String id;
        private int isDelete;
        private DrainProductBean.ProductBean product;
        private String productId;
        private int status;
        private int type;
        private String url;
        private String locationId;

        public String getLocationId() {
            return locationId;
        }

        public void setLocationId(String locationId) {
            this.locationId = locationId;
        }

        public String getCreationTime() {
            return creationTime;
        }

        public void setCreationTime(String creationTime) {
            this.creationTime = creationTime;
        }

        public String getDevice() {
            return device;
        }

        public void setDevice(String device) {
            this.device = device;
        }

        public String getDirectUrl() {
            return directUrl;
        }

        public void setDirectUrl(String directUrl) {
            this.directUrl = directUrl;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public int getIsDelete() {
            return isDelete;
        }

        public void setIsDelete(int isDelete) {
            this.isDelete = isDelete;
        }

        public DrainProductBean.ProductBean getProduct() {
            return product;
        }

        public void setProduct(DrainProductBean.ProductBean product) {
            this.product = product;
        }

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.creationTime);
            dest.writeString(this.device);
            dest.writeString(this.directUrl);
            dest.writeString(this.id);
            dest.writeInt(this.isDelete);
            dest.writeParcelable(this.product, flags);
            dest.writeString(this.productId);
            dest.writeInt(this.status);
            dest.writeInt(this.type);
            dest.writeString(this.url);
        }

        public AdBannerBean() {
        }

        protected AdBannerBean(Parcel in) {
            this.creationTime = in.readString();
            this.device = in.readString();
            this.directUrl = in.readString();
            this.id = in.readString();
            this.isDelete = in.readInt();
            this.product = in.readParcelable(DrainProductBean.ProductBean.class.getClassLoader());
            this.productId = in.readString();
            this.status = in.readInt();
            this.type = in.readInt();
            this.url = in.readString();
        }

        public static final Parcelable.Creator<AdBannerBean> CREATOR = new Parcelable.Creator<AdBannerBean>() {
            @Override
            public AdBannerBean createFromParcel(Parcel source) {
                return new AdBannerBean(source);
            }

            @Override
            public AdBannerBean[] newArray(int size) {
                return new AdBannerBean[size];
            }
        };
    }

    public static class BannerBean implements Parcelable {
        /**
         * creationTime : 2016-14-10 11:14:08
         * device : Android
         * directUrl : http://uhuishou.ronghezulin.com/banner/youhuishou/strategy.html
         * id : 2
         * isDelete : 2
         * product : {"amountDown":1000,"amountUp":100000,"applicationCondition":"你想借钱吗","applyCount":0,"auditDesc":"快来吧123213213","businessId":"1","creationDate":"2018-15-12 17:15:39","dayReat":"0.07","directUrl":"http://www.baidu.com","enable":"0","estimatedAmount":1000,"flag":"0","headline":"随心购","id":1,"isSelf":"y","marks":[{"id":"7","isDelete":"2","markDesc":"火爆","productId":"1"},{"id":"8","isDelete":"2","markDesc":"新口子,推荐","productId":"1"}],"payEnable":"0","period":10,"productDescription":"京东购物卡","productIcon":"http://192.168.1.95:12345/platform-app/images/home_but_jsjk@2x.png","productInfoId":2,"productName":"随心购","productTypeCode":"pay_card","productTypeName":"购物卡","range":"1000~10万","remark":"京东购物卡","renewServiceFee":200,"serviceFee":200,"subhead":"京东购物卡","unit":"天","updateDate":"2018-22-02 14:22:53"}
         * productId : 1
         * status : 1
         * type : 1
         * url : http://uhuishou.ronghezulin.com/banner/banner.jpg
         */

        private String creationTime;
        private String device;
        private String directUrl;
        private String id;
        private int isDelete;
        private DrainProductBean.ProductBean product;
        private String productId;
        private int status;
        private int type;
        private String url;
        private String locationId;

        public String getLocationId() {
            return locationId;
        }

        public void setLocationId(String locationId) {
            this.locationId = locationId;
        }

        public String getCreationTime() {
            return creationTime;
        }

        public void setCreationTime(String creationTime) {
            this.creationTime = creationTime;
        }

        public String getDevice() {
            return device;
        }

        public void setDevice(String device) {
            this.device = device;
        }

        public String getDirectUrl() {
            return directUrl;
        }

        public void setDirectUrl(String directUrl) {
            this.directUrl = directUrl;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public int getIsDelete() {
            return isDelete;
        }

        public void setIsDelete(int isDelete) {
            this.isDelete = isDelete;
        }

        public DrainProductBean.ProductBean getProduct() {
            return product;
        }

        public void setProduct(DrainProductBean.ProductBean product) {
            this.product = product;
        }

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.creationTime);
            dest.writeString(this.device);
            dest.writeString(this.directUrl);
            dest.writeString(this.id);
            dest.writeInt(this.isDelete);
            dest.writeParcelable(this.product, flags);
            dest.writeString(this.productId);
            dest.writeInt(this.status);
            dest.writeInt(this.type);
            dest.writeString(this.url);
        }

        public BannerBean() {
        }

        protected BannerBean(Parcel in) {
            this.creationTime = in.readString();
            this.device = in.readString();
            this.directUrl = in.readString();
            this.id = in.readString();
            this.isDelete = in.readInt();
            this.product = in.readParcelable(DrainProductBean.ProductBean.class.getClassLoader());
            this.productId = in.readString();
            this.status = in.readInt();
            this.type = in.readInt();
            this.url = in.readString();
        }

        public static final Parcelable.Creator<BannerBean> CREATOR = new Parcelable.Creator<BannerBean>() {
            @Override
            public BannerBean createFromParcel(Parcel source) {
                return new BannerBean(source);
            }

            @Override
            public BannerBean[] newArray(int size) {
                return new BannerBean[size];
            }
        };
    }

    public Rolling() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.maxLoanMoney);
        dest.writeString(this.selfLocationId);
        dest.writeString(this.status);
        dest.writeString(this.type);
        dest.writeString(this.url);
        dest.writeString(this.selfProductId);
        dest.writeString(this.id);
        dest.writeString(this.device);
        dest.writeString(this.directUrl);
        dest.writeString(this.productId);
        dest.writeByte(this.isDelete ? (byte) 1 : (byte) 0);
        dest.writeString(this.serviceCall);
        dest.writeString(this.workTime);
        dest.writeStringList(this.rolling);
        dest.writeTypedList(this.adBanner);
        dest.writeTypedList(this.banner);
    }

    protected Rolling(Parcel in) {
        this.maxLoanMoney = in.readString();
        this.selfLocationId = in.readString();
        this.status = in.readString();
        this.type = in.readString();
        this.url = in.readString();
        this.selfProductId = in.readString();
        this.id = in.readString();
        this.device = in.readString();
        this.directUrl = in.readString();
        this.productId = in.readString();
        this.isDelete = in.readByte() != 0;
        this.serviceCall = in.readString();
        this.workTime = in.readString();
        this.rolling = in.createStringArrayList();
        this.adBanner = in.createTypedArrayList(AdBannerBean.CREATOR);
        this.banner = in.createTypedArrayList(BannerBean.CREATOR);
    }

    public static final Creator<Rolling> CREATOR = new Creator<Rolling>() {
        @Override
        public Rolling createFromParcel(Parcel source) {
            return new Rolling(source);
        }

        @Override
        public Rolling[] newArray(int size) {
            return new Rolling[size];
        }
    };
}
